<?php

$redis = new Redis();
$redis->connect('127.0.0.1');

$redis->del('set1');

$redis->sAdd('set1', 'A');
$redis->sAdd('set1', 'B');
$redis->sAdd('set1', 'C');
$redis->sAdd('set1', 'C');

$value = $redis->sCard('set1');
print_r($value);   // 3

echo "<br>";

$value = $redis->sMembers('set1');
print_r($value);    // Array ( [0] => C [1] => B [2] => A )